Skip to content

Release 2026-08-13 (i4 b5c36d02) - #194

Merged
lfengad merged 1 commit into
mainfrom
release/2026-08-13-b5c36d02
Aug 13, 2026
Merged

Release 2026-08-13 (i4 b5c36d02)#194
lfengad merged 1 commit into
mainfrom
release/2026-08-13-b5c36d02

Conversation

@yy-code-nv

Copy link
Copy Markdown
Collaborator

Automated release from i4.

_source_commit: b5c36d029e1569c9fd75ea1e09dd6af3a36496a1-dirty
_dest_commit (base): 277c0f1d3f41db0d43a18a3235df03e75e708ed4

_source_commit: b5c36d029e1569c9fd75ea1e09dd6af3a36496a1-dirty
_dest_commit:   277c0f1
@lfengad
lfengad enabled auto-merge (squash) August 13, 2026 12:35
@lfengad
lfengad merged commit 08961b9 into main Aug 13, 2026
9 checks passed
@lfengad
lfengad deleted the release/2026-08-13-b5c36d02 branch August 13, 2026 12:38
lfengad added a commit that referenced this pull request Aug 13, 2026
…195)

# Re-land #183, which the 2026-08-13 release reverted

#183 merged as 277c0f1 on 2026-08-13 at 10:52 UTC. The very next commit
on
`main` — **Release 2026-08-13 (i4 b5c36d02) (#194)**, an automated
mirror of the
internal i4 tree cut from a source commit that predates the merge —
rewrote both
files back to their pre-#183 contents.

`main` today is byte-identical to `cd5e450`, the commit *before* #183
landed:

```
$ git diff cd5e450 origin/main -- cosmos_framework/auxiliary/guardrail/blocklist/
(no output)
```

`normalize_for_matching()` is gone, the misaligned
`uncensor_whitelist()` is
back, and `blocklist_test.py` has dropped from 32 tests to 8. Both
defects
described in #183 are live on `main` again — including the `IndexError`
that a
benign prompt like `'Snow White is flat'` raises against the production
lists.

## What this PR does

Restores the #183 state exactly, nothing more:

```
$ git diff 277c0f1 -- cosmos_framework/auxiliary/guardrail/blocklist/
(no output)
```

Two files, 258 insertions, 16 deletions — the same diff that was
reviewed and
approved on #183. #194 touches no other guardrail file, and no caller
outside
`blocklist.py` references either changed method, so there is nothing to
reconcile between the two changes.

## Recap of what comes back

1. **The whitelist restore corrupted the censored prompt.**
`censor_prompt`
walked the input and the censored text side by side *by position* to put
whitelisted words back, but a multi-word blocklist entry is replaced by
a
single censor token, so every such match shifts the censored list one
token
left. `'Snow White is flat'` → `IndexError`; `'a Snow White poster on a
flat
wall'` → the user is quoted `'a **** poster on a flat flat'`, with
`wall`
   silently overwritten. The whitelist is already handed to
`load_censor_words(whitelist_words=...)`, so the restore step is
**removed**
   rather than repaired.

2. **Invisible characters walked past the matcher.**
`normalize_for_matching()` folds them before censoring — NFKC, combining
marks dropped, invisible and bidirectional controls rewritten to a
space,
whitespace runs collapsed. Without it a zero-width space, soft hyphen,
fullwidth letter, or a second space evades a blocked phrase while
rendering
identically to a reader. As stated on #183, this blocks strictly more
than
   before. Homoglyphs remain out of scope.

The full analysis, the corpus measurement (same 4 of 492 Edge reasoner
QA
outputs block before and after, item for item), and the test-by-test
rationale
are on #183 and unchanged.

## Verification

`blocklist_test.py` is back to 32 tests; all 32 pass locally against
this
branch. The tests build the matcher directly, so they need no
checkpoint.

## Note for whoever owns the i4 → OSS sync

This will happen again on the next release unless the change is also
landed in
the internal i4 tree, or the guardrail blocklist files are excluded from
the
mirror. Re-landing it here fixes `main` today; it does not stop the next
automated release from reverting it a second time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants